<%@ page import="com.zgroup.domain.Estate" %>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="layout" content="main"/>
  <g:set var="entityName" value="${message(code: 'estate.label', default: 'Estate')}"/>
  <title><g:message code="default.edit.label" args="[entityName]"/></title>
</head>
<body>
<div class="nav">
  <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Home</a></span>
  <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]"/></g:link></span>
  <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]"/></g:link></span>
</div>
<div class="body">
  <h1><g:message code="default.edit.label" args="[entityName]"/></h1>
  <g:if test="${flash.message}">
    <div class="message">${flash.message}</div>
  </g:if>
  <g:hasErrors bean="${estateInstance}">
    <div class="errors">
      <g:renderErrors bean="${estateInstance}" as="list"/>
    </div>
  </g:hasErrors>
  <g:form method="post">
    <g:hiddenField name="id" value="${estateInstance?.id}"/>
    <g:hiddenField name="version" value="${estateInstance?.version}"/>
    <div class="dialog">
      <table>
        <tbody>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="name"><g:message code="estate.name.label" default="Name"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'name', 'errors')}">
            <g:textField name="name" maxlength="20" value="${estateInstance?.name}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="pinyin"><g:message code="estate.pinyin.label" default="Pinyin"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'pinyin', 'errors')}">
            <g:textField name="pinyin" maxlength="20" value="${estateInstance?.pinyin}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="type"><g:message code="estate.type.label" default="Type"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'type', 'errors')}">
            <g:textField name="type" maxlength="6" value="${estateInstance?.type}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="area"><g:message code="estate.area.label" default="Area"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'area', 'errors')}">
            <g:textField name="area" maxlength="6" value="${estateInstance?.area}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="sector"><g:message code="estate.sector.label" default="Sector"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'sector', 'errors')}">
            <g:textField name="sector" maxlength="10" value="${estateInstance?.sector}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="address"><g:message code="estate.address.label" default="Address"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'address', 'errors')}">
            <g:textArea name="address" cols="40" rows="5" value="${estateInstance?.address}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="approveFlag"><g:message code="estate.approveFlag.label" default="Approve Flag"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'approveFlag', 'errors')}">
            <g:textField name="approveFlag" maxlength="6" value="${estateInstance?.approveFlag}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="showFlag"><g:message code="estate.showFlag.label" default="Show Flag"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'showFlag', 'errors')}">
            <g:textField name="showFlag" maxlength="6" value="${estateInstance?.showFlag}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="approveUser"><g:message code="estate.approveUser.label" default="Approve User"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'approveUser', 'errors')}">
            <g:select name="approveUser.id" from="${com.zgroup.domain.admin.SysUser.list()}" optionKey="id" value="${estateInstance?.approveUser?.id}" noSelection="['null': '']"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="curMthVipBid"><g:message code="estate.curMthVipBid.label" default="Cur Mth Vip Bid"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'curMthVipBid', 'errors')}">
            <g:select name="curMthVipBid.id" from="${com.zgroup.domain.Bid.list()}" optionKey="id" value="${estateInstance?.curMthVipBid?.id}" noSelection="['null': '']"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="vipBid"><g:message code="estate.vipBid.label" default="Vip Bid"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'vipBid', 'errors')}">
            <g:select name="vipBid.id" from="${com.zgroup.domain.Bid.list()}" optionKey="id" value="${estateInstance?.vipBid?.id}" noSelection="['null': '']"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="firstBid"><g:message code="estate.firstBid.label" default="First Bid"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'firstBid', 'errors')}">
            <g:select name="firstBid.id" from="${com.zgroup.domain.Bid.list()}" optionKey="id" value="${estateInstance?.firstBid?.id}" noSelection="['null': '']"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="secondBid"><g:message code="estate.secondBid.label" default="Second Bid"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'secondBid', 'errors')}">
            <g:select name="secondBid.id" from="${com.zgroup.domain.Bid.list()}" optionKey="id" value="${estateInstance?.secondBid?.id}" noSelection="['null': '']"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="thirdBid"><g:message code="estate.thirdBid.label" default="Third Bid"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'thirdBid', 'errors')}">
            <g:select name="thirdBid.id" from="${com.zgroup.domain.Bid.list()}" optionKey="id" value="${estateInstance?.thirdBid?.id}" noSelection="['null': '']"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="dateApproved"><g:message code="estate.dateApproved.label" default="Date Approved"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'dateApproved', 'errors')}">
            <g:datePicker name="dateApproved" precision="day" value="${estateInstance?.dateApproved}" noSelection="['': '']"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="layoutAcceptPicNum"><g:message code="estate.layoutAcceptPicNum.label" default="Layout Accept Pic Num"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'layoutAcceptPicNum', 'errors')}">
            <g:textField name="layoutAcceptPicNum" value="${fieldValue(bean: estateInstance, field: 'layoutAcceptPicNum')}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="housePicNum"><g:message code="estate.housePicNum.label" default="House Pic Num"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'housePicNum', 'errors')}">
            <g:textField name="housePicNum" value="${fieldValue(bean: estateInstance, field: 'housePicNum')}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="lastUpdated"><g:message code="estate.lastUpdated.label" default="Last Updated"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'lastUpdated', 'errors')}">
            <g:datePicker name="lastUpdated" precision="day" value="${estateInstance?.lastUpdated}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="estAcceptPicNum"><g:message code="estate.estAcceptPicNum.label" default="Est Accept Pic Num"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'estAcceptPicNum', 'errors')}">
            <g:textField name="estAcceptPicNum" value="${fieldValue(bean: estateInstance, field: 'estAcceptPicNum')}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="createUser"><g:message code="estate.createUser.label" default="Create User"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'createUser', 'errors')}">
            <g:select name="createUser.id" from="${com.zgroup.domain.User.list()}" optionKey="id" value="${estateInstance?.createUser?.id}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="dateCreated"><g:message code="estate.dateCreated.label" default="Date Created"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'dateCreated', 'errors')}">
            <g:datePicker name="dateCreated" precision="day" value="${estateInstance?.dateCreated}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="infoReleases"><g:message code="estate.infoReleases.label" default="Info Releases"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'infoReleases', 'errors')}">
            <g:select name="infoReleases" from="${com.zgroup.domain.InfoRelease.list()}" multiple="yes" optionKey="id" size="5" value="${estateInstance?.infoReleases}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="estPicNum"><g:message code="estate.estPicNum.label" default="Est Pic Num"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'estPicNum', 'errors')}">
            <g:textField name="estPicNum" value="${fieldValue(bean: estateInstance, field: 'estPicNum')}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="layoutPicNum"><g:message code="estate.layoutPicNum.label" default="Layout Pic Num"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'layoutPicNum', 'errors')}">
            <g:textField name="layoutPicNum" value="${fieldValue(bean: estateInstance, field: 'layoutPicNum')}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="areaName"><g:message code="estate.areaName.label" default="Area Name"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'areaName', 'errors')}">
            <g:textField name="areaName" value="${estateInstance?.areaName}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="bidPrice"><g:message code="estate.bidPrice.label" default="Bid Price"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'bidPrice', 'errors')}">
            <g:textField name="bidPrice" value="${fieldValue(bean: estateInstance, field: 'bidPrice')}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="displayBidPrice"><g:message code="estate.displayBidPrice.label" default="Display Bid Price"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'displayBidPrice', 'errors')}">
            <g:textField name="displayBidPrice" value="${estateInstance?.displayBidPrice}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="displayVipPrice"><g:message code="estate.displayVipPrice.label" default="Display Vip Price"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'displayVipPrice', 'errors')}">
            <g:textField name="displayVipPrice" value="${estateInstance?.displayVipPrice}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="infoCount"><g:message code="estate.infoCount.label" default="Info Count"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'infoCount', 'errors')}">
            <g:textField name="infoCount" value="${fieldValue(bean: estateInstance, field: 'infoCount')}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="randomInfo"><g:message code="estate.randomInfo.label" default="Random Info"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'randomInfo', 'errors')}">

          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="sectorName"><g:message code="estate.sectorName.label" default="Sector Name"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'sectorName', 'errors')}">
            <g:textField name="sectorName" value="${estateInstance?.sectorName}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="thumbCoverPic"><g:message code="estate.thumbCoverPic.label" default="Thumb Cover Pic"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'thumbCoverPic', 'errors')}">
            <g:textField name="thumbCoverPic" value="${estateInstance?.thumbCoverPic}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="typeName"><g:message code="estate.typeName.label" default="Type Name"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'typeName', 'errors')}">
            <g:textField name="typeName" value="${estateInstance?.typeName}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="userCount"><g:message code="estate.userCount.label" default="User Count"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'userCount', 'errors')}">
            <g:textField name="userCount" value="${fieldValue(bean: estateInstance, field: 'userCount')}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="userService"><g:message code="estate.userService.label" default="User Service"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'userService', 'errors')}">

          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="vipPrice"><g:message code="estate.vipPrice.label" default="Vip Price"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: estateInstance, field: 'vipPrice', 'errors')}">
            <g:textField name="vipPrice" value="${fieldValue(bean: estateInstance, field: 'vipPrice')}"/>
          </td>
        </tr>

        </tbody>
      </table>
    </div>
    <div class="buttons">
      <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}"/></span>
      <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');"/></span>
    </div>
  </g:form>
</div>
</body>
</html>
